package com.example.zluserservice.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author zhenliu（孙凌岳）
 * @Description AI生成 - 角色信息响应DTO
 * @Date 2025/6/15 14:48
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@ApiModel(description = "角色信息响应DTO")
public class RoleResDTO implements Serializable {
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色标识")
    private String label;

    @ApiModelProperty(value = "排序")
    private Integer sortNo;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "列表选择：选中角色Ids")
    private String[] checkedIds;

    @ApiModelProperty(value = "TREE结构：选中资源No")
    private String[] checkedResourceNos;

    @ApiModelProperty(value = "TREE结构：选中No")
    private String[] checkedDeptNos;

    @ApiModelProperty(value = "人员查询：当前人员Id")
    private String userId;

    @ApiModelProperty(value = "数据范围（0自定义  1本人 2管理员看普通用户 3全部）")
    private String dataScope;

    private String dataState;

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//get
    protected LocalDateTime createTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//get
    protected String createDay;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//get
    protected LocalDateTime updateTime;

    @ApiModelProperty(value = "创建者:username")
    private Long createBy;

    @ApiModelProperty(value = "更新者:username")
    private Long updateBy;

    @ApiModelProperty(value = "创建人类型 1 前台 2后台")
    private Integer createType;

    @ApiModelProperty(value = "创建人名称")
    private String creator;

    @ApiModelProperty(value = "后台管理端创建人名称")
    private String adminCreator;

    @ApiModelProperty(value = "更新人名称")
    private String updater;

    @Builder
    public RoleResDTO(String roleName, String label, Integer sortNo, String remark, String[] checkedIds, String[] checkedResourceNos, String[] checkedDeptNos, String userId, String dataScope, String dataState, Long id, LocalDateTime createTime, String createDay, LocalDateTime updateTime, Long createBy, Long updateBy, Integer createType, String creator, String adminCreator, String updater) {
        this.roleName = roleName;
        this.label = label;
        this.sortNo = sortNo;
        this.remark = remark;
        this.checkedIds = checkedIds;
        this.checkedResourceNos = checkedResourceNos;
        this.checkedDeptNos = checkedDeptNos;
        this.userId = userId;
        this.dataScope = dataScope;
        this.dataState = dataState;
        this.id = id;
        this.createTime = createTime;
        this.createDay = createDay;
        this.updateTime = updateTime;
        this.createBy = createBy;
        this.updateBy = updateBy;
        this.createType = createType;
        this.creator = creator;
        this.adminCreator = adminCreator;
        this.updater = updater;
    }
}
